﻿using System;
using Core.Common;
using Microsoft.Extensions.Configuration;

namespace TTSClient
{
    class AppSetting
    {
        public AppSetting()
        {
            Speed = 40;
            Volume = 100;
        }

        static AppSetting()
        {
            Current = AppSettings.Configuration?.Get<AppSetting>();
        }

        public string ApiUrl { get; set; }
        public string AppId { get; set; }
        public string ApiKey { get; set; }
        public string ApiSecret { get; set; }
        public string RequestLine { get; set; }
        public string RootPath { get; set; }
        public string VcnCode { get; set; }
        /// <summary>
        /// 语速
        /// </summary>
        public int Speed { get; set; }
        /// <summary>
        /// 音量
        /// </summary>
        public int Volume { get; set; }
        public string LanguageUrl { get; set; }
        public string PaymentLanguageUrl { get; set; }
        public Uri ApiUri => new Uri(ApiUrl);
        internal static AppSetting Current { get; set; }
    }
}
